package calao.storage.bdb;

public class CursorReader
extends FetchReader
{
	
	final TableCursor cursor;
	
	CursorReader(TableCursor cursor) {
		super(cursor.tdb.table);
		this.cursor = cursor;
	}

	@Override
	boolean onRead(Object value) {
		if (!cursor.meetsFetchConditions(field, value)) return true;
		return super.onRead(value);
	}
	
	@Override
	boolean onRead(Object[] values) {
		if (!cursor.meetsFetchConditions(field, values)) return true;
		return super.onRead(values);
	}
	
	@Override
	boolean skipsField() {
		return cursor.skips(field);
	}

}
